#include <allegro.h>
#include "object.h"

object::object(int x, int y, int speed_y, BITMAP *img) {
	this->x = x;
	this->y = y;

	this->speed_y = speed_y;

	this->img = img;

	this->w = img->w;
	this->h = img->h;
}

int object::out(int ground_y) {
	if ((y + h) > ground_y)
		return 1;

	return 0;
}

void object::draw(BITMAP *buffer) {
	draw_sprite(buffer, this->img, this->x, this->y);
}
